<?php require('../inc/gzip-header-js.php'); ?>
//Recent Comments
jQuery(document).ready(function(){
  jQuery.ajax({
    url: "<?php echo $_GET['wpurl'];?>/wp-content/json/recentcomments.json",
    dataType: 'json',
    timeout: 15000,
    type:'GET',
    timeout: function(){
    	jQuery('#rc_c').append('Timeout Error!');
    },
    error: function(){
        jQuery('#rc_c').append('Error loading XML document');
    },
    success: function(data){
		jQuery('#rc_c').empty();
		var html = '<ul>';
		//jQuery.each(data, function(eindex,entry){
		for (i = 0 ; i < data.length ; i++){
			temp = data[i];
            html += '<li>';
            html += '&#187;<a href="' + temp.c_a_url + '">' + temp.c_a + '</a>';
	        html += ': <a href="' + temp.c_c_url + '" style="color:#000">';
	        html += temp.c_c + '</a><br />';
	        html += '&#8212;&#171;<strong>'+ temp.p_t +'</strong>&#187;</li>';
		//});
		}
		html += '</ul>';
		jQuery('#rc_c').append(html);
    }
  });
}); 


/*this piece is for coolcode*/
function linenumber(o){
	if(o.className=="hl-main ln-hide"){
		o.title="Double click to hide line number.";
		o.className="hl-main ln-show";
	}else{
		o.title="Double click to show line number.";
		o.className="hl-main ln-hide";
	}
}
/* coolcode end*/